package javabase.enum_learn;

/**
 * @Auther: luzhanshi
 * @Date: 2021/2/21 - 02 - 21 - 9:37 
 * @Description: javabase.enum_learn
 * @version: 1.0
 * 定义枚举类：季节
 */
public class Season {
    //定义属性
    private final String seasonName;//季节名称
    private final String seasonDesc;//季节描述

    //    利用私有构造器对属性进行赋值
    private Season(String seasonName, String seasonDesc) {
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }

    //提供枚举类有限的  确定的对象
    public static final Season SPRING = new Season("春天", "春暖花开");
    public static final Season SUMMER = new Season("夏天", "夏日炎炎");
    public static final Season AUTUMN = new Season("秋天", "金色大地");
    public static final Season WINTER = new Season("冬天", "冰天雪地");

    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

    @Override
    public String toString() {
        return "Season{" +
                "seasonName='" + seasonName + '\'' +
                ", seasonDesc='" + seasonDesc + '\'' +
                '}';
    }
}
